﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace CCWP7.Service
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface ICruiseControl
    {
        /// <summary>
        /// Tries to find and return existing subscription uri for existing client
        /// </summary>
        /// <param name="clientId"></param>
        /// <returns></returns>
        [OperationContract]
        [WebGet(UriTemplate = "TryGetSubscriptionUri?clientId={clientId}")]
        string TryGetSubscriptionUri(string clientId);

        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "Subscribe?clientId={clientId}")]
        void Subscribe(string clientId);

        [OperationContract]
        [WebGet(UriTemplate = "MonitoredServerUris/")]
        string[] MonitoredServerUris();
    }
}
